import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/store";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import axios from "axios";
import VueAxios from "vue-axios";

Vue.config.productionTip = false;
Vue.prototype.$axios=axios
Vue.prototype.$store=store
// axios.defaults.baseURL ="http://abce.vaiwan.com/"
axios.defaults.baseURL = "http://114.132.236.89:8081/";
// axios.defaults.withCredentials=true;
axios.interceptors.request.use(config => {//声明请求拦截器
  console.log(config);
  config.headers.Authorization = window.localStorage.getItem('token')//获取token值
  return config//一定要返回
})
// Vue.prototype.$http = axios
Vue.use(ElementUI);

new Vue({
  router,
  store,
  axios,
  VueAxios,
  render: (h) => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this;
  },
}).$mount("#app");
